package com.wzh.dao;

import com.wzh.pojo.Po.Mes;
import com.wzh.pojo.Req.DataReq;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface MesDao {
	@Insert("insert into mes (orderid,phone,type,code1,time) value(#{orderId},#{phone},#{type},#{code1},NOW())")
	Integer add(Mes mes);


//	@Select("select * from mes ORDER BY id DESC limit #{pageIndex},#{pageCount}")
	List<Mes> find(DataReq req);
    @Update("update mes set code1=#{code1},code2=#{code2},codetime=NOW(),type=#{type} where orderid=#{orderId}")
	Integer update(Mes mes);
}
